package cn.easybuy.dao;

import cn.easybuy.entity.User;

import java.sql.SQLException;
import java.util.List;

/**
 * 用户信息接口
 */
public interface UserDao {
    /**
     * 注册用户
     * @param user
     * @return
     */
    int addUser(User user) throws SQLException;

    /**
     * 注销用户
     * @param user
     * @return
     */
    int logoffUser(User user)throws SQLException;

    /**
     * 用户登录
     * @param user
     * @return
     */
    User loginUser(User user)throws SQLException;

    /**
     * 查询所有用户
     * @return
     */
    List<User> listAll()throws SQLException;

}
